/* 
 * File:   ipd_png.h
 * Author: dima
 *
 * Created on 21 декабря 2014 г., 15:47
 */

#ifndef IPD_PNG_H
#define	IPD_PNG_H
#include <png.h>
#include <string>
#include "ipd_img.h"
namespace ipd
{

class ipd_png
{
public:
    ipd_png();
    void load_png(ipd_img &img, std::string file_name); // load image
    void save_png(ipd_img &img, std::string file_name, int bit_depth = 8); // save image
    virtual ~ipd_png();
private:
    bool convert_png_to_img(color_model &type_img, png_uint_32 color_type); // convert type image from libpng to local format
    bool convert_img_to_png(png_uint_32 &color_type, color_model type_img); // convert type image from local format to libpng 
};



}
#endif	/* IPD_PNG_H */

